Purpose:
- Master configures clock frequency, polarity (CPOL), and phase (CPHA) to match the slave.
- CPOL & CPHA define when data is sampled and changed relative to the clock.


CPOL – Clock Polarity


CPHA – Clock Phase

For CPHA = 0:

For CPHA = 1:

SPI_timing_diagram.png

Timing Note: